vector<int> missingTwo(vector<int>& nums) {
    int n = nums.size();
    int x = 0;
    for (auto e : nums)
    {
        x ^= e;
    }
    for (int i = 0; i <= n + 2; i++)
    {
        x ^= i;
    }
    int lsb = (x == INT_MIN ? x : x & (-x));
    int a = 0, b = 0;
    for (int e : nums)
    {
        if (e & lsb) a ^= e;
        else b ^= e;
    }
    for (int i = 1; i <= n + 2; i++)
    {
        if (i & lsb) a ^= i;
        else b ^= i;
    }

    return { a,b };
}    vector<int> missingTwo(vector<int>& nums) {
    int n = nums.size();
    int x = 0;
    for (auto e : nums)
    {
        x ^= e;
    }
    for (int i = 0; i <= n + 2; i++)
    {
        x ^= i;
    }
    int lsb = (x == INT_MIN ? x : x & (-x));
    int a = 0, b = 0;
    for (int e : nums)
    {
        if (e & lsb) a ^= e;
        else b ^= e;
    }
    for (int i = 1; i <= n + 2; i++)
    {
        if (i & lsb) a ^= i;
        else b ^= i;
    }

    return { a,b };
}    vector<int> missingTwo(vector<int>& nums) {
    int n = nums.size();
    int x = 0;
    for (auto e : nums)
    {
        x ^= e;
    }
    for (int i = 0; i <= n + 2; i++)
    {
        x ^= i;
    }
    int lsb = (x == INT_MIN ? x : x & (-x));
    int a = 0, b = 0;
    for (int e : nums)
    {
        if (e & lsb) a ^= e;
        else b ^= e;
    }
    for (int i = 1; i <= n + 2; i++)
    {
        if (i & lsb) a ^= i;
        else b ^= i;
    }

    return { a,b };
}